package bavaria.hightech.banking.junit;

import bavaria.hightech.banking.bank.BankImpl;
import bavaria.hightech.banking.bank.BankRegistry;
import bavaria.hightech.banking.exceptions.BankDoesNotExistException;

/**
 * junit testcase BankRegistryTest
 * @author David
 *
 */
public class BankRegistryTest extends junit.framework.TestCase {

	BankImpl bank3;

	@Override
	public void setUp() {
		bank3 = new BankImpl("bank3", "de");
		assertNotNull(BankRegistry.bind("bank3", bank3));
	}

	public void testLookup() {
		try {
			assertNotNull(bank3 == BankRegistry.lookup("bank3"));
		} catch (BankDoesNotExistException e) {
			fail();
		}
	}

}
